<?php

namespace app\admin\model;

use think\Model;

class ResourceSaleWallet extends Model
{
    /**
     * 创建钱包（收益）
     * @param $data
     * @return ResourceSaleWallet|Model
     */
    public static function createResourceSaleWallet($data)
    {
        return self::create($data);
    }

    /**
     * 钱包收益数据
     * @param $where
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getResourceSaleWallet($where)
    {
        $data = self::where($where)->select();

        return $data ? $data->toArray() : [];
    }
}